package com.youlu.campus.entity;

import com.youlu.campus.base.base.EntityBase;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * 用户参与活动答题排行榜
 */
@Getter
@Setter
@Document(collection = "user_qa_ranking")
@CompoundIndexes({
        @CompoundIndex(name = "user_qa_comIdx",def = "{'userId':1,'activityId':1,'qaInfoId':1}",unique = true)
})
public class UserQaRanking extends EntityBase {

    @Indexed
    private String userId;

    private String headImageUrl;

    private String universityId;

    private String universityName;

    private String nickName;

    private String avatarUrl;
    @Indexed
    private String activityId;
    @Indexed
    private String qaInfoId;
    /**
     * 答题标题
     */
    private String qaTitle;
    /**
     * 序号1、初赛、2、复赛 、3决赛
     */
    private Integer qaNo=1;

    private Double qaScore=0D;
}
